package com.ruoyi.sale.domain;

import java.util.List;
import java.util.Date;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;

/**
 * 销售计划对象 tb_plan
 * 
 * @author ruoyi
 * @date 2023-10-13
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@TableName(value="tb_plan")
public class Plan extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 主键id */
    @TableId("id")
    private Long id;

    /** 计划编号 */
    @TableField("plan_number")
    @Excel(name = "计划编号")
    private String planNumber;

    /** 计划名称 */
    @TableField("plan_name")
    @Excel(name = "计划名称")
    private String planName;

    /** 发往店铺 */
    @TableField("go_shop")
    @Excel(name = "发往店铺")
    private Long goShop;

    /** 货运方式 */
    @TableField("freight_method")
    @Excel(name = "货运方式")
    private Long freightMethod;

    /** 货运方式 */
    @TableField(exist = false)
    @Excel(name = "货运方式id")
    private Integer mannerId;

    /** 计划状态（0：未审，1：已审，2：部分发货，3：发货完毕） */
    @TableField("plan_status")
    private String planStatus;

    /** 发货时间 */
    @TableField("ship_time")
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "发货时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date shipTime;

    /** 制单日期 */
    @TableField("preparation_time")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "发货时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date preparationTime;

    /** 审核人 */
    @TableField("approver")
    private String approver;

    /** 审核日期 */
    @TableField("audit_time")
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "发货时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date auditTime;

    /** 产品拼接 */
    @TableField("products_splicing")
    private String productsSplicing;

    /** 删除状态 0存在1删除 */
    @TableField("delete_status")
    private String deleteStatus;

    /** 备货状态 */
    @TableField("shipping_status")
    private Integer shippingStatus;

    /** 发货产品信息 */
    @TableField(exist = false)
    private List<ShipmentsProduct> shipmentsProductList;

    /** 货运方式 */
    @TableField(exist = false)
    private String mannerName;

    @TableField("user_id")
    private Long userId;

    /** 用户名称 */
    @TableField(exist = false)
    private String nickName;

    /** 用户头像 */
    @TableField(exist = false)
    private String avatar;

    /** 部门名称 */
    @TableField(exist = false)
    private String deptName;

    @TableField(exist = false)
    private Long deptId;

    @TableField(exist = false)
    private String postName;

    @TableField(exist = false)
    private Long postId;

    @TableField(exist = false)
    private String ancestors;


    // 店铺层级表中的店铺id
    @TableField(exist = false)
    private Integer shopId;

    @TableField(exist = false)
    private String shopName;

    @TableField("select_status")
    /**当前是否可选状态*/
    private String selectStatus;

    @TableField(exist = false)
    /** 添加仓库备货时用户选择的统一的货运方式 */
    private Integer selectedManner;

    @TableField(exist = false)
    /** 添加仓库备货时用户选择的备货仓库 */
    private Integer warehouse;

    @TableField(exist = false)
    /** 添加仓库备货时用户选择的备货仓库 */
    private Integer logisticsCompany;

    /**  当前审核用户ID */
    @TableField("reviewer_user_id")
    private Long reviewerUserId;

    @TableField(exist = false)
    /** 采购计划号 */
    private String procuredPlanNumber;

    /** 采购单号 */
    @TableField(exist = false)
    private String procuredOrdersNumber;

    @TableField(exist = false)
    private List<String> gtins;

    @TableField(exist = false)
    private List<Long> productIds;

    /**
     * 查询sku条件
     */
    @TableField(exist = false)
    private String searchSku;
    /**
     * 用于存储如果有sku查询条件查询出来的销售计划id集合
     */
    @TableField(exist = false)
    private List<Long> planIds;
    /**
     * 是否是备货计划处查询销售计划信息
     */
    @TableField(exist = false)
    private Boolean flag;
}
